package oopday04;

import java.util.Scanner;
import java.util.Timer;
import java.util.TimerTask;

public class TimerDemo {
    /*
    public static void main(String[] args) {
        Timer timer=new Timer();
        int interval=1000;
        timer.schedule(new TimerTask() {
            public void run() {
                System.out.println("起床");
            }
        }, 5000,1000);
    }



    public static void main(String[] args) {
        Timer timer = new Timer();
        int interval = 1000;
        timer.schedule(new TimerTask(){
            public void run(){
                System.out.println("起床");
            }
        },5000,1000);
    }*/


}
